<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib prefix="sx" uri="/struts-dojo-tags" %>
<%@ taglib prefix="wd" uri="/wd-tags" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
	<title><s:text name="edit" /><s:text name="limit" /></title>
    <link href="${path }/back/${themeBack}/css/css.css" rel="stylesheet" type="text/css" />
    <wd:headJquery/>
    <script type="text/javascript" src="${path }/back/${themeBack}/js/js.js"></script>
    <sx:head/>
</head>
<body>
<s:form namespace="/back" action="ro_limit" method="post" validate="true">
<s:set name="roleList" value="getRoleHelper().getListNotAll()" scope="page" />
<s:set name="roleId" value="#request.entity.roleId" scope="page"/>
<s:if test="#attr.roleId == null || #attr.roleId == 0">
	<s:set name="roleId" value="#attr.roleList.get(0).id" scope="page"/>
</s:if>
<s:set name="roleHaveList" value="getOperateHelper().getByRole(#attr.roleId)" scope="page" />
<s:set name="roleNoneList" value="getOperateHelper().getNotList(#attr.roleHaveList)" scope="page" />	
	<table id="theme_table" cellpadding="2" cellspacing="1">
		<tr>
			<td class="td_title" colspan="2"><s:text name="edit" /><s:text name="limit" /></td>
		</tr>
		<tr>
			<td class="td_content" colspan="2">&nbsp;<s:actionmessage/><s:fielderror/></td>
		</tr>
		<tr>
			<td class="td_show"><s:text name="role" />:</td>
			<td class="td_input">
				<s:select id="role" list="#attr.roleList" cssClass="select" name="entity.roleId" listKey="id" listValue="name" />
			</td>		
		</tr>
		<tr>
			<td class="td_show"><s:text name="oper" />:</td>
			<td class="td_input">
			<s:optiontransferselect id="oper" doubleId="notOper" name="operIds" doubleName="" cssClass="double_left_select" doubleCssClass="double_rigth_select" 
				listKey="id" listValue="name" doubleListKey="id" doubleListValue="name"
				list="#attr.roleHaveList" doubleList="#attr.roleNoneList" value="false"
				allowUpDownOnLeft="false" allowUpDownOnRight="false" allowSelectAll="false">
			</s:optiontransferselect>
			</td>				
		</tr>
		<tr>
			<td class="td_show">&nbsp;</td>
			<td class="td_input">
				<s:if test="isRights('role_limit')">
					<s:submit cssClass="submit" value="%{getText('edit')}" />
				</s:if>
			</td>
		</tr>
	</table>
</s:form>
</body>
</html>
